package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 入库单
 *
 * @author yw
 * @date 2022-03-22 20:47:05
 **/
@Data
@TableName("warehousing_entry")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "入库单")
public class WarehousingEntry extends BaseModel<WarehousingEntry> {

    @ApiModelProperty(value = "入库单编号")
    private String entryCode;

    @ApiModelProperty(value = "关联的业务编号")
    private String serviceCode;

    @ApiModelProperty(value = "汇总时的所属仓库下的提货单ID")
    private String sourceId;

    /**
     * 数据类型：1：入库单；2：出库单；3：销售出库
     */
    @ApiModelProperty(value = "单据类型:\"CSRK\": \"铺货入库\", \"CGRK\": \"预售补货\"，“XSBH”：\"销售补货\", \"DBRK\": \"调拨入库\",\"DBCK\": \"调拨出库\", \"HSCK\": \"报损出库\", \"QXRK\": \"取消入库\", \"TDRK\": \"退单入库\", \"FHCK\": \"销售发货出库\"")
    private String dataType;

    @ApiModelProperty(value = "业务单号类型（1：（骑手）配送单，2：（司机）运输单）")
    private Integer orderType;

    @ApiModelProperty(value = "入库类型：1：采购入库,2：调拨入库,3：销售退货订单入库,4：空箱入库，5：寄存入库，6：采购退贷入库，7：铺货入库，8：补货入库")
    private Integer serviceType;

    @ApiModelProperty(value = "仓库编号")
    private String warehouseCode;

    @ApiModelProperty(value = "会员编号")
    private String memberCode;

    @ApiModelProperty(value = "货箱编号")
    private String boxCode;

    @ApiModelProperty(value = "原料ID")
    private String spuId;

    @ApiModelProperty(value = "sku编码")
    private String skuCode;

    @ApiModelProperty(value = "规格编码")
    private String specCode;

    @ApiModelProperty(value = "批次编号")
    private String batchCode;

    @ApiModelProperty(value = "入库单价")
    private BigDecimal price;

    @ApiModelProperty(value = "入库数量")
    private Integer quantity;

    @ApiModelProperty(value = "货箱内某个商品入库总重")
    private BigDecimal weight;

    @ApiModelProperty(value = "是否已称重：0、否；1：是")
    private boolean weightDone;

    @ApiModelProperty(value = "数量单位(箱/袋/盒/斤等)")
    private String unit;

    @ApiModelProperty(value = "标品每箱包含的物件数量/份数")
    private Integer numberOfPerBox;

    @ApiModelProperty(value = "标品每份重量")
    private BigDecimal weightOfPerBox;

    @ApiModelProperty(value = "采购员")
    private String purchaserId;

    @ApiModelProperty(value = "供应商")
    private String supplierCode;

    @ApiModelProperty(value = "所属农户")
    private String producerId;

    @ApiModelProperty(value = "保质期(品类保质期预留，入库单输入保质期为主，供应商乱输保质期不管，入库单保质期>原料保质期>品类保质期)")
    private LocalDateTime shelfLife;

    @ApiModelProperty(value = "保质期")
    private Integer warrantyDate;

    @ApiModelProperty(value = "长")
    private BigDecimal length;

    @ApiModelProperty(value = "宽")
    private BigDecimal width;

    @ApiModelProperty(value = "高")
    private BigDecimal height;

    @ApiModelProperty(value = "配送费用")
    private BigDecimal distributionCost;

    @ApiModelProperty(value = "采摘时间")
    private LocalDateTime pickTime;

    @ApiModelProperty(value = "原产地(农户地址/供应商地址)")
    private String provenance;

    @ApiModelProperty(value = "状态：0、等待入库；1、完成入库；2、货箱缺失")
    private String status;

    @ApiModelProperty(value = "调拨单ID, 包裹编号")
    private String saleOrderDetailId;

    @ApiModelProperty(value = "是否整箱1:非整箱,2:整箱")
    private Integer fullBox;


    @ApiModelProperty("存储温区")
    @TableField(exist = false)
    private Integer temperatureZoneCode;

    @ApiModelProperty(value = "关联的业务编号")
    @TableField(exist = false)
    private String associatedOrderCode;

    @ApiModelProperty(value = "数据类型列表，用于查询")
    @TableField(exist = false)
    private List<String> dataTypeList;
}